import axios from '@/libs/api.request'

export const _getUsers = (param) => {
    return axios.request({
      url: 'system/user/show',
      params: param,
      method: 'get'
    })
  }

// 改变状态
export const _status = (param) => {
  return axios.request({
    url: 'system/user/status',
    params: param,
    method: 'post'
  })
}
  

  // 获取联系信息
  export const _getContact = (param) => {
    return axios.request({
      url: 'system/contact/show',
      params: param,
      method: 'get'
    })
  }

  // 员工职位类型
  export const _getPosition = () => {
    return axios.request({
      url: 'system/role/show',
      params: {},
      method: 'get'
    })
  }
  
  // 获取员工
  export const _getStaff = (param) => {
    return axios.request({
      url: 'system/staff/show',
      params: param,
      method: 'get'
    })
  }
  // 删除员工
  export const _delStaffById = (param) => {
    return axios.request({
      url: 'system/staff/delete',
      params: param,
      method: 'post'
    })
  }
  // 更新员工
  export const _upStaffById = (param) => {
    return axios.request({
      url: 'system/staff/update',
      params: param,
      method: 'post'
    })
  }

  // 联系信息新增&保存
  export const _contactSave = (param) => {
    return axios.request({
      url: 'system/contact/save',
      params: param,
      method: 'post'
    })
  }

  // export const _saveStaff = (param) => {
  //   return axios.request({
  //     url: 'system/contact/save',
  //     params: param,
  //     method: 'post'
  //   })
  // }